<?php


namespace app\api\controller;

use app\admin\model\Wear as WearModel;

class Wear extends Controller
{
    public function index()
    {
        $file = request()->file('wear_picture');

        session_start();
        $name = $_SESSION['n'] ;
        $model = new WearModel();
        $users = $model->getList($name);
        $this->assign('wear_id', $users);
        return $this->renderSuccess($users, '获取数据成功');
    }

    public function detail($id)
    {
        $model = new WearModel();
        $emp = $model->where(['wear_id' => $id])->find();
        return $this->renderSuccess($emp, '获取员工数据成功');
    }
}
